import request from '@/utils/request'

export function getEmps(queryParams) {
  return request({
    url: 'http://localhost:8082/emps',
    method: 'get',
    params: queryParams
  })
}

// 新增员工
export function save(data) {
  return request({
    url: 'http://localhost:8082/emps',
    method: 'post',
    data
  })
}

// 更新员工
export function updateEmp(data) {
  return request({
    url: `http://localhost:8082/emps`,
    method: 'put',
    data
  })
}

// 删除员工
export function deleteEmp(id) {
  return request({
    url: `http://localhost:8082/emps`,
    method: 'delete',
    params: { id }
  })
}
